package com.bdqn.vueboot.entity;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;

import java.io.Serializable;
import java.time.LocalDateTime;
import java.util.Date;

/**
 * @TableName conference
 */
@TableName(value = "conference")
@Data
public class Conference implements Serializable {
    /**
     *
     */
    @TableId
    private Integer id;

    /**
     *
     */
    @TableField(value = "conference_Name")
    private String conferenceName;

    /**
     * 会议室地址
     */
    @TableField(value = "conference_Address")
    private String conferenceAddress;
    /**
     * 创建者
     */
    @TableField(fill = FieldFill.INSERT, value = "creation_Id")
    private Integer creationId;

    /**
     * 创建时间
     */
    @TableField(fill = FieldFill.INSERT, value = "creation_Time")
    private Date creationTime;

    /**
     * 修改者
     */
    @TableField(fill = FieldFill.INSERT_UPDATE, value = "update_Id")
    private Integer updateId;

    /**
     * 修改时间
     */
    @TableField(fill = FieldFill.INSERT_UPDATE, value = "update_Time")
    private Date updateTime;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        Conference other = (Conference) that;
        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
                && (this.getConferenceName() == null ? other.getConferenceName() == null : this.getConferenceName().equals(other.getConferenceName()))
                && (this.getConferenceAddress() == null ? other.getConferenceAddress() == null : this.getConferenceAddress().equals(other.getConferenceAddress()))
                && (this.getCreationId() == null ? other.getCreationId() == null : this.getCreationId().equals(other.getCreationId()))
                && (this.getCreationTime() == null ? other.getCreationTime() == null : this.getCreationTime().equals(other.getCreationTime()))
                && (this.getUpdateId() == null ? other.getUpdateId() == null : this.getUpdateId().equals(other.getUpdateId()))
                && (this.getUpdateTime() == null ? other.getUpdateTime() == null : this.getUpdateTime().equals(other.getUpdateTime()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
        result = prime * result + ((getConferenceName() == null) ? 0 : getConferenceName().hashCode());
        result = prime * result + ((getConferenceAddress() == null) ? 0 : getConferenceAddress().hashCode());
        result = prime * result + ((getCreationId() == null) ? 0 : getCreationId().hashCode());
        result = prime * result + ((getCreationTime() == null) ? 0 : getCreationTime().hashCode());
        result = prime * result + ((getUpdateId() == null) ? 0 : getUpdateId().hashCode());
        result = prime * result + ((getUpdateTime() == null) ? 0 : getUpdateTime().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", conferenceName=").append(conferenceName);
        sb.append(", conferenceAddress=").append(conferenceAddress);
        sb.append(", creationId=").append(creationId);
        sb.append(", creationTime=").append(creationTime);
        sb.append(", updateId=").append(updateId);
        sb.append(", updateTime=").append(updateTime);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}
